Skip to content

feat: Implement row_range parameter support in SampleRowKeys API#13457

Open
anvitTawar wants to merge 2 commits into
googleapis:mainfrom
anvitTawar:sample-row-keys-row-range
Open

feat: Implement row_range parameter support in SampleRowKeys API#13457
anvitTawar wants to merge 2 commits into
googleapis:mainfrom
anvitTawar:sample-row-keys-row-range

Conversation

@anvitTawar

Copy link
Copy Markdown

Expose rowRange property of type ByteStringRange on SampleRowKeysRequest wrapper and its builder. Map rowRange to protobuf row_range in toProto() and read it back in fromProto(). Add convenience methods to BigtableDataClient.
Add unit tests and integration tests.

@anvitTawar anvitTawar requested review from a team as code owners June 12, 2026 20:22

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds convenience methods to BigtableDataClient for sampling row keys within a specified ByteStringRange both synchronously and asynchronously. It also updates SampleRowKeysRequest to support row ranges, adds proto conversion methods to ByteStringRange, and includes corresponding unit and integration tests. A review comment correctly identifies a typo in the Javadoc sample code where BigtableClient is used instead of BigtableDataClient, which would cause compilation errors.

* <p>Sample code:
*
* <pre>{@code
* try (BigtableClient bigtableDataClient = BigtableClient.create("[PROJECT]", "[INSTANCE]")) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The sample code in the Javadoc uses BigtableClient instead of BigtableDataClient. This will cause compilation errors if copied directly.

Suggested change
* try (BigtableClient bigtableDataClient = BigtableClient.create("[PROJECT]", "[INSTANCE]")) {
* try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
References
  1. Update stale Javadoc comments to reflect new method behavior for improved clarity, rather than removing them.

Expose rowRange property of type ByteStringRange on SampleRowKeysRequest wrapper and its builder.
Map rowRange to protobuf row_range in toProto() and read it back in fromProto().
Add convenience methods to BigtableDataClient.
Add unit tests and integration tests.

TAG=agy
CONV=015d968b-2de3-4c29-8f2d-8acdf06f6135
@anvitTawar anvitTawar force-pushed the sample-row-keys-row-range branch from a3dd1c9 to ab72c9b Compare June 12, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant